package com.l.controller.print;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.l.entity.User;
import com.l.service.ExcelService;
import com.l.utils.Msg;

@Controller
public class PrintController {
	@Autowired
	ExcelService excelService;
	//打印
	@RequestMapping("/dayin")
	@ResponseBody
	public Msg dayin(){
		List<User> userlist=excelService.selectUser();
		Printqian printqian=new Printqian(userlist);
		YcPrinter p=new YcPrinter(printqian);
		p.printer();
		return Msg.success();
	}

}
